#include "sysconfig.h"

#define CONFDB_NAME "conf_sql.sql"
#define EGATEWAY_DB "/home/dusun/code/130/DSGK-130-APP/config.db"
DtDb_Ptr sysconfig::m_confdb;
Channelmgr sysconfig::m_channelmgr;

void sysconfig::init()
{
    if(nullptr == m_confdb){
        m_confdb.reset(new DtDb());
    }
    m_confdb->open(EGATEWAY_DB);
    printf("open conf db:%s\n",EGATEWAY_DB);
    m_channelmgr.init();
}
void sysconfig::close_confdb()
{
     if(nullptr == m_confdb){
        return;
    }
    m_confdb->open(EGATEWAY_DB);
}

